import { http } from "@/utlis/http";

//上传衣服
export const postClothesAPI = (data: any) => {
  return http({
    method: "POST",
    url: "/clothes/save/info",
    data,
  });
};

//获取衣服分类
export const getClothesAPI = () => {
  return http({
    method: "GET",
    url: "/category/list",
  });
};

//获取衣服的分类大类
export const getCategoryAPI = () => {
  return http({
    method: "GET",
    url: "/category/map",
  });
};
export const getCategoryMapAPI = () => {
  return http({
    method: "GET",
    url: "/category/MapList",
  });
};
export const getClothesDetailAPI = (id: string) => {
  return http({
    url: `/clothes/detail/${id}`,
    method: "GET",
  });
};

export const postGoodsAPI = (data: any) => {
  return http({
    url: `/goods/create`,
    method: "POST",
    data,
  });
};

export const postSale = (data: any) => {
  return http({
    url: `/goods/list`,
    method: "POST",
    data,
  });
};
